package com.qd.common.sys.domain.entity.msg;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 发送内容
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class MsgReceiveContentDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "内容标识不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "内容标识长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String contentId;
    /**
     * 模版编号
     */
    @Size(max = 50, message = "模版编号长度不能超过{max}位", groups = DefaultGroup.class)
    private String tempId;
    /**
     * 内容链接
     */
    @Size(max = 300, message = "内容链接长度不能超过{max}位", groups = DefaultGroup.class)
    private String contentUrl;
    /**
     * 内容详细
     */
    private String contentDetail;
    /**
     * 内容属性
     */
    private String prop;
    /**
     * 写入时间
     */
    private LocalDateTime addTime;
    /**
     * 发送ID
     */
    @NotBlank(message = "发送ID不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "发送ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String receiveId;

    @Override
    public void freeData() {
        this.contentId = null;
        this.tempId = null;
        this.contentUrl = null;
        this.contentDetail = null;
        this.prop = null;
        this.addTime = null;
        this.receiveId = null;
        super.freeData();
    }
}
